projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
30719e2
)
ARM: OMAP5+: GPIO: Add GPIO_TO_PIN() macro
author
Roger Quadros
<
[email protected]
>
Mon, 13 Mar 2017 13:04:24 +0000
(15:04 +0200)
committer
Tom Rini
<
[email protected]
>
Mon, 20 Mar 2017 21:56:21 +0000
(17:56 -0400)
GPIO_TO_PIN(bank, bank_gpio) returns the GPIO index
from the GPIO bank number and bank's GPIO offset number.
Signed-off-by: Roger Quadros <
[email protected]
>
Reviewed-by: Tom Rini <
[email protected]
>
Reviewed-by: Lokesh Vutla <
[email protected]
>
arch/arm/include/asm/arch-omap5/gpio.h
patch
|
blob
|
history
diff --git
a/arch/arm/include/asm/arch-omap5/gpio.h
b/arch/arm/include/asm/arch-omap5/gpio.h
index 9dd03c9fa6512b100938d8aec4bd446a936fa590..48e8ca502132f7cf48f7720119137505ca1ebbc5 100644
(file)
--- a/
arch/arm/include/asm/arch-omap5/gpio.h
+++ b/
arch/arm/include/asm/arch-omap5/gpio.h
@@
-34,4
+34,8
@@
#define OMAP54XX_GPIO7_BASE 0x48051000
#define OMAP54XX_GPIO8_BASE 0x48053000
+
+/* Get the GPIO index from the given bank number and bank gpio */
+#define GPIO_TO_PIN(bank, bank_gpio) (32 * (bank - 1) + (bank_gpio))
+
#endif /* _GPIO_OMAP5_H */